package com.example.spring_seatreservation.mapper;

import com.example.spring_seatreservation.entity.Role;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface RoleMapper {

    @Select("select * from role")
    List<Role> getRoleList();

    @Insert("insert into role(name,description,product,create_time) " +
            "values(#{name},#{description},#{product},now())")
    boolean insert(Role role);

    @Update("update role set name = #{name},description=#{description},product=#{product},update_time=now() where id = #{id}")
    boolean update(Role role);
}
